package org.dromara.mall.domain.bo;

import org.dromara.mall.domain.TerMallOrderitem;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

/**
 * 订单明细业务对象 ter_mall_orderitem
 *
 * @author xch
 * @date 2025-06-27
 */
@Data
@AutoMapper(target = TerMallOrderitem.class, reverseConvertGenerate = false)
public class TerMallOrderitemBo {

    /**
     *
     */
    @NotNull(message = "不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 订单ID
     */
    @NotNull(message = "订单ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private String orderId;

    /**
     * 商品ID
     */
    @NotNull(message = "商品ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long productId;

    /**
     * 商品名称（快照）
     */
    @NotBlank(message = "商品名称（快照）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String productName;

    /**
     * 单价（快照）
     */
    @NotNull(message = "单价（快照）不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer price;

    /**
     * 数量
     */
    @NotNull(message = "数量不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer quantity;

    /**
     * 总价
     */
    @NotNull(message = "总价不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer totalPrice;
    private String thumbnail;

}
